package nl.utwente.fmt.vertalerbouw.tarrh.checker;

/**
 * Class to hold all data related to variable entries in the checker.
 */
public class CheckerVariableEntry {
	private final boolean isConstant;
	private final CheckerClassEntry type;

	/**
	 * Construct a new variable entry with the specified type.
	 * 
	 * @param type
	 *            the type of the variable.
	 * @param isConstant
	 *            true if the variable is a constant, false otherwise.
	 */
	public CheckerVariableEntry(CheckerClassEntry type, boolean isConstant) {
		super();
		this.type = type;
		this.isConstant = isConstant;
	}

	/**
	 * Get the type of the variable represented by this entry.
	 * 
	 * @return the type of the variable.
	 */
	public CheckerClassEntry getType() {
		return type;
	}

	/**
	 * Returns true if the variable represented by this entry is a constant.
	 * 
	 * @return true if the variable is a constant.
	 */
	public boolean isConstant() {
		return isConstant;
	}
}
